import request from '@/utils/request'

// 获取任务列表
export function listManagement(query) {
    return request({
        url: '/system/management/list',
        method: 'get',
        params: query
    })
}

// 新增任务
export function addManagement(data) {
    return request({
        url: '/system/management',
        method: 'post',
        data
    })
}

// 修改任务
export function updateManagement(data) {
    return request({
        url: '/system/management',
        method: 'put',
        data
    })
}

// 获取任务详情
export function getManagementDetail(id) {
    return request({
        url: '/system/management/' + id,
        method: 'get'
    })
}

// 获取审核数据
export function getExamineData(id) {
    return request({
        url: '/system/management/getExamineData',
        method: 'get',
        params: {
            taskId: id
        }
    })
}


// 审核通过
export function auditPass(data) {
    return request({
        url: '/system/management/unifiedApplication',
        method: 'post',
        data
    })
}

export function delManagement(id) {
    return request({
        url: '/system/management/' + id,
        method: 'delete',
        params: {
            taskId: id
        },
        data: {
            taskId: id
        }
    })
}

export function hideManagement(data) {
    return request({
        url: '/system/management/updateType',
        method: 'post',
        data
    })
}

